#ifndef GENERATER_H
#define GENERATER_H

#include <fstream>
#include <iostream>
#include <cassert>
#include <errno.h>
#include <string.h>

//#include <json/json.h>
//#include <json/value.h>
//#include <json/reader.h>
//#include <json/writer.h>
#include <json.h>
#include <netinet/tcp.h>
#include <string>

class  generater
{
public:
    generater();
    ~generater();
    void generate_device_info(std::string & json_str);
    void generate_alarm(std::string & json_str_alarm);
    void generate_helloack(std::string & json_str_helloack, std::string for_id);
    void generate_heartbeat(std::string & json_str_heartbeat, std::string for_id);
    std::string generate_alarm_from_deque(const std::string &robotid,
                                         const std::string &alarmtype,
                                         const std::string &startposition,
                                         const std::string &endposition,
                                         const std::string &alarmlevel,
                                         const std::string &detailsize,
                                         const std::string &filename,
                                         const std::string &description,
                                         const std::string &currenttime);

    std::string generate_info_from_deque(const std::string &robotid,
                                         const std::string &infotype,
                                         const std::string &localposition,
                                         const std::string &currenttime,
                                         const std::string &detailssize,
                                         const std::string &filename,
                                         const std::string &description);

private:
};



#endif
